package de.uni_potsdam.hpi.bpt.ai.collection.impl;


import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import de.uni_potsdam.hpi.bpt.ai.collection.Model;
import de.uni_potsdam.hpi.bpt.ai.collection.Revision;


public class ModelImpl implements Model {
	private String id;

	String name;

	Date date;

	List<Revision> revisions = new ArrayList<Revision>();
	public ModelImpl() {
	}
	/* (non-Javadoc)
	 * @see org.oryxproject.bpm_ai.Model#getRevisions()
	 */
	@Override
	public List<Revision> getRevisions() {
		Collections.sort(revisions);
		return revisions;
	}

	/* (non-Javadoc)
	 * @see org.oryxproject.bpm_ai.Model#getNumberOfRevision()
	 */
	@Override
	public Integer getNumberOfRevision() {
		return revisions.size();
	}

	/* (non-Javadoc)
	 * @see org.oryxproject.bpm_ai.Model#getId()
	 */
	@Override
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	/* (non-Javadoc)
	 * @see org.oryxproject.bpm_ai.Model#getName()
	 */
	@Override
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	/* (non-Javadoc)
	 * @see org.oryxproject.bpm_ai.Model#getDate()
	 */
	@Override
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}



}
